using SqlSugar;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Serialization;
using System.ComponentModel;

namespace NCP.Model
{
    [Serializable]
    [SugarTable("DeptMergeInfo")]
    public partial class DeptMergeInfo : BaseModel2
    {

        /// <summary>
        /// 科室编码
        /// </summary>
        [Description("科室编码")]
        [SugarColumn(ColumnName = "DeptCode")]
        public string DeptCode { get; set; }

        /// <summary>
        /// 科室名称
        /// </summary>
        [Description("科室名称")]
        [SugarColumn(ColumnName = "DeptName")]
        public string DeptName { get; set; }

        /// <summary>
        /// 拼音码
        /// </summary>
        [Description("拼音码")]
        [SugarColumn(ColumnName = "SpellCode")]
        public string SpellCode { get; set; }

        /// <summary>
        /// 是否有效 1有效 0无效
        /// </summary>
        [SugarColumn(ColumnName = "ValidFlag")]
        public string ValidFlag { get; set; } = "1";

        /// <summary>
        /// 1 门诊 2 住院 3 其他
        /// </summary>
        [SugarColumn(ColumnName = "DeptType")]
        public string DeptType { get; set; }

        /// <summary>
        /// 01老院 02新院
        /// </summary>
        [SugarColumn(ColumnName = "HospitalArea")]
        public string HospitalArea { get; set; }

        [SugarColumn(IsIgnore = true)]
        public string HospitalAreaName
        {
            get
            {
                if ("00".Equals(HospitalArea))
                    return "全院";
                if ("01".Equals(HospitalArea))
                    return "老院";
                if ("02".Equals(HospitalArea))
                    return "新院";
                return "";
            }
        }

        /// <summary>
        /// 操作人
        /// </summary>
        [SugarColumn(ColumnName = "OperCode")]
        public string OperCode { get; set; }

        /// <summary>
        /// 操作时间
        /// </summary>
        [SugarColumn(ColumnName = "OperDate")]
        public DateTime OperDate { get; set; }

    }
}